<template>
    <a-flex gap="middle" justify="flex-end" align="center" style="height: 48px">
        <a-button type="primary" style="float: right; margin: 8px 0;" @click="ButtonEvent">编辑自定义页面</a-button>
    </a-flex>
</template>

<script setup>

import { useRouter, useRoute } from 'vue-router';

const Router = useRouter();
const Route = useRoute();


const ButtonEvent = function () {
    // const href = Router.resolve({
    //     name: 'Custom-Designer',
    //     params: {
    //         appId: Route.params.appId,
    //         formId: Route.params.formId,
    //     },
    // }).href;
    // window.open(href, "_blank");
    Router.push({
        name: 'Custom-Designer',
        params: {
            appId: Route.params.appId,
            formId: Route.params.formId,
        },
    })
}
</script>

<style lang="less" scoped></style>